package com.sc.nft.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sc.nft.entity.MallUserPropsRewardsDetail;
import com.sc.nft.entity.vo.UserPropsRewardsSummaryVO;
import com.sc.nft.entity.vo.UserPropsRewardsVO;
import com.sc.nft.mapper.MallUserPropsRewardsDetailMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Slf4j
@Repository
public class MallUserPropsRewardsDetailDao extends ServiceImpl<MallUserPropsRewardsDetailMapper, MallUserPropsRewardsDetail> {

    /**
     * 查询用户道具奖励汇总数据
     */
    public Page<UserPropsRewardsVO> getUserPropsRewardsSummaryPage(Page page, Date startTime,
                                                                   Date endTime,
                                                                   Long userId,
                                                                   Long daoId,
                                                                   List<Long> propsIds) {
        return baseMapper.getUserPropsRewardsSummaryPage(page, startTime, endTime, userId, daoId, propsIds);
    }

    /**
     * 查询用户道具奖励汇总数据
     */
    public UserPropsRewardsVO getUserPropsRewardsSummary(Date startTime,
                                                         Date endTime,
                                                         Long userId,
                                                         Long daoId,
                                                         List<Long> propsIds) {
        return baseMapper.getUserPropsRewardsSummary(startTime, endTime, userId, daoId, propsIds);
    }
}